package basis;

public class ConcreteHandlerA implements Handler {
    private Handler nextHandler;
    @Override
    public void handleRequest(int request) {
        if(request<10){
            System.out.println("basis.ConcreteHandlerA 处理请求：" + request);
        } else if (nextHandler!=null) {
            nextHandler.handleRequest(request);
        }

    }

    @Override
    public void setNextHandler(Handler handler) {
        this.nextHandler=handler;
    }
}
